import 'package:flutter/material.dart';

class SingleLineTagWidget extends StatelessWidget {
  final IndexedWidgetBuilder builder;
  final int count;

  const SingleLineTagWidget({Key key, this.builder, this.count}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Widget result = LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
      assert(constraints.hasBoundedWidth);
      final double maxWidth = constraints.maxWidth;
      List<Widget> list = List();
      double width = 0;
      int index = 0;
      while(width <= maxWidth){
        var child = builder(context,index);
        // RenderBox renderBox = RenderBox();
        // final double childWidth = child.getMaxIntrinsicWidth(double.infinity);
      }
      return Row(children: list);
    });

    return result;
  }

}
